package com.hub.realtime.resource;

import com.hub.realtime.resource.service.IResFlinkProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.messaging.handler.annotation.DestinationVariable;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

@Controller
public class WebSocketController {

    @Autowired
    IResFlinkProjectService flinkProjectService;


    @MessageMapping("/build/{id}")
    public void build(@DestinationVariable("id") Long id) {
        flinkProjectService.tailBuildLog(id);
    }

//    @MessageMapping("/mvn/{id}")
//    public void mvn(@DestinationVariable("id") Long id) {
//        flinkProjectService.tailMvnDownloading(id);
//    }
}
